package com.restkeeper.store.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 挂账记录
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="CreditLogs", description="挂账记录")
@TableName(value = "t_credit_logs")
public class CreditLogs extends BaseStoreEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 挂账日志id
     */
    @ApiModelProperty(value = "挂账日志id")
    @TableId(value = "log_id", type = IdType.ASSIGN_ID)
    private String logId;

    /**
     * 订单
     */
    @ApiModelProperty(value = "订单")
    @TableField(value = "order_id")
    private String orderId;

    /**
     * 挂账关联id
     */
    @ApiModelProperty(value = "挂账关联id")
    @TableField(value = "credit_id")
    private String creditId;

    /**
     * 挂账类型 挂账类型  1 公司 2 个人
     */
    @ApiModelProperty(value = "挂账类型  1 公司 2 个人")
    @TableField(value = "credit_type")
    private Integer creditType;

    /**
     * 挂账公司名称
     */
    @ApiModelProperty(value = "挂账公司名称")
    @TableField(value = "company_name")
    private String companyName;

    /**
     * 挂账人名称
     */
    @ApiModelProperty(value = "挂账人名称")
    @TableField(value = "user_name")
    private String userName;

    /**
     * 挂账人电话
     */
    @ApiModelProperty(value = "挂账人电话")
    private String phone;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单金额")
    @TableField(value = "order_amount")
    private Integer orderAmount;

    /**
     * 应收金额
     */
    @ApiModelProperty(value = "应收金额")
    @TableField(value = "received_amount")
    private Integer receivedAmount;

    /**
     * 挂账金额
     */
    @ApiModelProperty(value = "挂账金额")
    @TableField(value = "credit_amount")
    private Integer creditAmount;
}
